package com.grass.p019lv.databinding;

import android.graphics.drawable.Drawable;
import android.support.p007v4.media.session.PlaybackStateCompat;
import android.util.SparseIntArray;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.databinding.DataBindingComponent;
import androidx.databinding.ViewDataBinding;
import androidx.databinding.adapters.ImageViewBindingAdapter;
import com.androidsa.bttsddka.R;
import com.androidx.p013lv.base.view.CircleImageView;
import com.grass.p019lv.activity.MainActivity;
import com.grass.p019lv.generated.callback.OnClickListener;

/* renamed from: com.grass.lv.databinding.ActivityMainBindingImpl */
public class ActivityMainBindingImpl extends ActivityMainBinding implements OnClickListener.Listener {
    private static final ViewDataBinding.IncludedLayouts sIncludes = null;
    private static final SparseIntArray sViewsWithIds;
    private final View.OnClickListener mCallback51;
    private final View.OnClickListener mCallback52;
    private final View.OnClickListener mCallback53;
    private final View.OnClickListener mCallback54;
    private final View.OnClickListener mCallback55;
    private long mDirtyFlags;
    private final RelativeLayout mboundView0;
    private final LinearLayout mboundView1;
    private final ImageView mboundView11;
    private final TextView mboundView12;
    private final LinearLayout mboundView13;
    private final ImageView mboundView14;
    private final TextView mboundView15;
    private final ImageView mboundView2;
    private final TextView mboundView3;
    private final LinearLayout mboundView4;
    private final ImageView mboundView5;
    private final TextView mboundView6;
    private final LinearLayout mboundView7;
    private final ImageView mboundView8;
    private final TextView mboundView9;

    /* access modifiers changed from: protected */
    @Override // androidx.databinding.ViewDataBinding
    public boolean onFieldChange(int i, Object obj, int i2) {
        return false;
    }

    static {
        SparseIntArray sparseIntArray = new SparseIntArray();
        sViewsWithIds = sparseIntArray;
        sparseIntArray.put(R.id.main_frame_layout, 16);
        sViewsWithIds.put(R.id.iv_svip, 17);
        sViewsWithIds.put(R.id.iv_voice_play_btn, 18);
    }

    public ActivityMainBindingImpl(DataBindingComponent dataBindingComponent, View view) {
        this(dataBindingComponent, view, mapBindings(dataBindingComponent, view, 19, sIncludes, sViewsWithIds));
    }

    private ActivityMainBindingImpl(DataBindingComponent dataBindingComponent, View view, Object[] objArr) {
        super(dataBindingComponent, view, 0, (LinearLayout) objArr[17], (CircleImageView) objArr[18], (LinearLayout) objArr[10], (FrameLayout) objArr[16]);
        this.mDirtyFlags = -1;
        this.llGame.setTag(null);
        RelativeLayout relativeLayout = (RelativeLayout) objArr[0];
        this.mboundView0 = relativeLayout;
        relativeLayout.setTag(null);
        LinearLayout linearLayout = (LinearLayout) objArr[1];
        this.mboundView1 = linearLayout;
        linearLayout.setTag(null);
        ImageView imageView = (ImageView) objArr[11];
        this.mboundView11 = imageView;
        imageView.setTag(null);
        TextView textView = (TextView) objArr[12];
        this.mboundView12 = textView;
        textView.setTag(null);
        LinearLayout linearLayout2 = (LinearLayout) objArr[13];
        this.mboundView13 = linearLayout2;
        linearLayout2.setTag(null);
        ImageView imageView2 = (ImageView) objArr[14];
        this.mboundView14 = imageView2;
        imageView2.setTag(null);
        TextView textView2 = (TextView) objArr[15];
        this.mboundView15 = textView2;
        textView2.setTag(null);
        ImageView imageView3 = (ImageView) objArr[2];
        this.mboundView2 = imageView3;
        imageView3.setTag(null);
        TextView textView3 = (TextView) objArr[3];
        this.mboundView3 = textView3;
        textView3.setTag(null);
        LinearLayout linearLayout3 = (LinearLayout) objArr[4];
        this.mboundView4 = linearLayout3;
        linearLayout3.setTag(null);
        ImageView imageView4 = (ImageView) objArr[5];
        this.mboundView5 = imageView4;
        imageView4.setTag(null);
        TextView textView4 = (TextView) objArr[6];
        this.mboundView6 = textView4;
        textView4.setTag(null);
        LinearLayout linearLayout4 = (LinearLayout) objArr[7];
        this.mboundView7 = linearLayout4;
        linearLayout4.setTag(null);
        ImageView imageView5 = (ImageView) objArr[8];
        this.mboundView8 = imageView5;
        imageView5.setTag(null);
        TextView textView5 = (TextView) objArr[9];
        this.mboundView9 = textView5;
        textView5.setTag(null);
        setRootTag(view);
        this.mCallback55 = new OnClickListener(this, 5);
        this.mCallback51 = new OnClickListener(this, 1);
        this.mCallback52 = new OnClickListener(this, 2);
        this.mCallback54 = new OnClickListener(this, 4);
        this.mCallback53 = new OnClickListener(this, 3);
        invalidateAll();
    }

    @Override // androidx.databinding.ViewDataBinding
    public void invalidateAll() {
        synchronized (this) {
            this.mDirtyFlags = 4;
        }
        requestRebind();
    }

    @Override // androidx.databinding.ViewDataBinding
    public boolean hasPendingBindings() {
        synchronized (this) {
            if (this.mDirtyFlags != 0) {
                return true;
            }
            return false;
        }
    }

    @Override // androidx.databinding.ViewDataBinding
    public boolean setVariable(int i, Object obj) {
        if (113 == i) {
            setMain((MainActivity) obj);
        } else if (140 != i) {
            return false;
        } else {
            setPosition((Integer) obj);
        }
        return true;
    }

    @Override // com.grass.p019lv.databinding.ActivityMainBinding
    public void setMain(MainActivity mainActivity) {
        this.mMain = mainActivity;
        synchronized (this) {
            this.mDirtyFlags |= 1;
        }
        notifyPropertyChanged(113);
        super.requestRebind();
    }

    @Override // com.grass.p019lv.databinding.ActivityMainBinding
    public void setPosition(Integer num) {
        this.mPosition = num;
        synchronized (this) {
            this.mDirtyFlags |= 2;
        }
        notifyPropertyChanged(140);
        super.requestRebind();
    }

    /* access modifiers changed from: protected */
    @Override // androidx.databinding.ViewDataBinding
    public void executeBindings() {
        long j;
        Drawable drawable;
        Drawable drawable2;
        int i;
        int i2;
        int i3;
        Drawable drawable3;
        int i4;
        Drawable drawable4;
        long j2;
        long j3;
        long j4;
        long j5;
        long j6;
        long j7;
        long j8;
        long j9;
        long j10;
        long j11;
        synchronized (this) {
            j = this.mDirtyFlags;
            this.mDirtyFlags = 0;
        }
        MainActivity mainActivity = this.mMain;
        Integer num = this.mPosition;
        long j12 = j & 6;
        Drawable drawable5 = null;
        int i5 = 0;
        if (j12 != 0) {
            int safeUnbox = ViewDataBinding.safeUnbox(num);
            boolean z = safeUnbox == 0;
            boolean z2 = safeUnbox == 4;
            boolean z3 = safeUnbox == 3;
            boolean z4 = safeUnbox == 5;
            if (safeUnbox == 1) {
                i5 = 1;
            }
            if (j12 != 0) {
                if (z) {
                    j11 = j | PlaybackStateCompat.ACTION_SET_CAPTIONING_ENABLED;
                    j10 = 4194304;
                } else {
                    j11 = j | PlaybackStateCompat.ACTION_SET_SHUFFLE_MODE_ENABLED;
                    j10 = PlaybackStateCompat.ACTION_SET_SHUFFLE_MODE;
                }
                j = j11 | j10;
            }
            if ((j & 6) != 0) {
                if (z2) {
                    j9 = j | 4096;
                    j8 = 16384;
                } else {
                    j9 = j | 2048;
                    j8 = 8192;
                }
                j = j9 | j8;
            }
            if ((j & 6) != 0) {
                if (z3) {
                    j7 = j | 256;
                    j6 = 65536;
                } else {
                    j7 = j | 128;
                    j6 = 32768;
                }
                j = j7 | j6;
            }
            if ((j & 6) != 0) {
                if (z4) {
                    j5 = j | 16;
                    j4 = 64;
                } else {
                    j5 = j | 8;
                    j4 = 32;
                }
                j = j5 | j4;
            }
            if ((j & 6) != 0) {
                if (i5 != 0) {
                    j3 = j | 1024;
                    j2 = PlaybackStateCompat.ACTION_SET_REPEAT_MODE;
                } else {
                    j3 = j | 512;
                    j2 = 131072;
                }
                j = j3 | j2;
            }
            TextView textView = this.mboundView3;
            i2 = z ? getColorFromResource(textView, R.color.mainColor) : getColorFromResource(textView, R.color.a838383);
            Drawable drawableFromResource = getDrawableFromResource(this.mboundView2, z ? R.drawable.ic_main_recommend_new : R.drawable.ic_main_recommend_no_new);
            drawable3 = z2 ? getDrawableFromResource(this.mboundView8, R.drawable.ic_main_appointment_new) : getDrawableFromResource(this.mboundView8, R.drawable.ic_main_appointment_no_new);
            TextView textView2 = this.mboundView9;
            i3 = z2 ? getColorFromResource(textView2, R.color.mainColor) : getColorFromResource(textView2, R.color.a838383);
            TextView textView3 = this.mboundView15;
            i = z3 ? getColorFromResource(textView3, R.color.mainColor) : getColorFromResource(textView3, R.color.a838383);
            drawable2 = getDrawableFromResource(this.mboundView14, z3 ? R.drawable.ic_main_mine_new : R.drawable.ic_main_mine_no_new);
            Drawable drawableFromResource2 = z4 ? getDrawableFromResource(this.mboundView11, R.drawable.ic_main_game) : getDrawableFromResource(this.mboundView11, R.drawable.ic_main_game_no);
            TextView textView4 = this.mboundView12;
            int colorFromResource = z4 ? getColorFromResource(textView4, R.color.mainColor) : getColorFromResource(textView4, R.color.a838383);
            drawable = getDrawableFromResource(this.mboundView5, i5 != 0 ? R.drawable.ic_main_find_new : R.drawable.ic_main_find_no_new);
            drawable4 = drawableFromResource;
            drawable5 = drawableFromResource2;
            i4 = i5 != 0 ? getColorFromResource(this.mboundView6, R.color.mainColor) : getColorFromResource(this.mboundView6, R.color.a838383);
            i5 = colorFromResource;
        } else {
            drawable4 = null;
            drawable3 = null;
            drawable2 = null;
            drawable = null;
            i4 = 0;
            i3 = 0;
            i2 = 0;
            i = 0;
        }
        if ((j & 4) != 0) {
            this.llGame.setOnClickListener(this.mCallback54);
            this.mboundView1.setOnClickListener(this.mCallback51);
            this.mboundView13.setOnClickListener(this.mCallback55);
            this.mboundView4.setOnClickListener(this.mCallback52);
            this.mboundView7.setOnClickListener(this.mCallback53);
        }
        if ((j & 6) != 0) {
            ImageViewBindingAdapter.setImageDrawable(this.mboundView11, drawable5);
            this.mboundView12.setTextColor(i5);
            ImageViewBindingAdapter.setImageDrawable(this.mboundView14, drawable2);
            this.mboundView15.setTextColor(i);
            ImageViewBindingAdapter.setImageDrawable(this.mboundView2, drawable4);
            this.mboundView3.setTextColor(i2);
            ImageViewBindingAdapter.setImageDrawable(this.mboundView5, drawable);
            this.mboundView6.setTextColor(i4);
            ImageViewBindingAdapter.setImageDrawable(this.mboundView8, drawable3);
            this.mboundView9.setTextColor(i3);
        }
    }

    @Override // com.grass.p019lv.generated.callback.OnClickListener.Listener
    public final void _internalCallbackOnClick(int i, View view) {
        boolean z = false;
        boolean z2 = true;
        if (i == 1) {
            MainActivity mainActivity = this.mMain;
            if (mainActivity == null) {
                z2 = false;
            }
            if (z2) {
                mainActivity.mainTabOnClickListener(0);
            }
        } else if (i == 2) {
            MainActivity mainActivity2 = this.mMain;
            if (mainActivity2 != null) {
                z = true;
            }
            if (z) {
                mainActivity2.mainTabOnClickListener(1);
            }
        } else if (i == 3) {
            MainActivity mainActivity3 = this.mMain;
            if (mainActivity3 != null) {
                z = true;
            }
            if (z) {
                mainActivity3.mainTabOnClickListener(4);
            }
        } else if (i == 4) {
            MainActivity mainActivity4 = this.mMain;
            if (mainActivity4 != null) {
                z = true;
            }
            if (z) {
                mainActivity4.mainTabOnClickListener(5);
            }
        } else if (i == 5) {
            MainActivity mainActivity5 = this.mMain;
            if (mainActivity5 != null) {
                z = true;
            }
            if (z) {
                mainActivity5.mainTabOnClickListener(3);
            }
        }
    }
}
